<template>
  <div class="home">
    <button @click="onPopShow">点击弹窗</button>
    <pop-alert v-model="alertShow">
      {{ alertText }}
      <!-- 插槽 -->
    </pop-alert>
  </div>
</template>

<script>
// @ is an alias to /src
import PopAlert from "packages";

export default {
  name: "Home",
  components: {
    PopAlert
  },
  data() {
    return {
      alertText: "曹沛的弹窗",
      alertShow:false
    };
  },
  methods: {
    onPopShow() {
      this.alertText = "请输入正确的姓名";
      this.alertShow = true;
    }
  }
};
</script>
